package com.codedef.cidaren.controller;

import com.codedef.cidaren.common.response.Result;
import com.codedef.cidaren.common.response.ResultCode;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Slf4j
@RestController
public class TestController {

    // 验证
    @RequestMapping("/hello")
    public Result hello() {
        log.info("/hello  被访问");

        List<String> list = new ArrayList<>();
        list.add("Hello aaa");
        list.add("Hello bbb");
        list.add("Hello ccc");

        return new Result(ResultCode.SUCCESS, list);
    }

    @RequestMapping("/ans")
    public Result ans(@RequestBody String reqMap) {
        log.info("reqMap is {}", reqMap);



        return null;
    }



}
